<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.global.js"></script>
</head>

<body>
    <div id="app">
        <date-picker @change="showChange"></date-picker>
    </div>
    <script>
        const app = Vue.createApp({
            methods: {
                showChange(event) {
                    console.log(event.target.value) // 将打印所选选项的值
                }
            }
        })
        app.component('date-picker', {
            template: `
            <select>
                <option value="1">Yesterday</option>
                <option value="2">Today</option>
                <option value="3">Tomorrow</option>
            </select>
        `
        })

        app.mount("#app")
    </script>
</body>

</html>